﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using GrayParrot.Web.Formly;

namespace WebTest.Metadata
{
    public class CustomerMetadata
    {
        [FormFieldAttribute(Type = FormFieldTypes.Input)]
        [TextTemplateOptionsAttribute(Label = "Customer Id",
            Description = "Lunghezza max 50 caratteri",
            Placeholder = "Indicare il numero documento",
            Required = true,
            MinLength = 0,
            MaxLength = 50)]
        public string CustomerId { get; set; } // CustomerID (Primary key)

        [FormFieldAttribute(Type = FormFieldTypes.Input)]
        [TextTemplateOptionsAttribute(Label = "Company Name",
            Description = "Lunghezza max 50 caratteri",
            Placeholder = "Indicare il numero documento",
            Required = true,
            MinLength = 0,
            MaxLength = 50)]
        public string CompanyName { get; set; } // CompanyName

        [FormFieldAttribute(Type = FormFieldTypes.Input)]
        [TextTemplateOptionsAttribute(Label = "Contact Name",
            Description = "Lunghezza max 50 caratteri",
            Placeholder = "Indicare il numero documento",
            Required = true,
            MinLength = 0,
            MaxLength = 50)]
        public string ContactName { get; set; } // ContactName

        [FormFieldAttribute(Type = FormFieldTypes.Input)]
        [TextTemplateOptionsAttribute(Label = "Contact Title",
            Description = "Lunghezza max 50 caratteri",
            Placeholder = "Indicare il numero documento",
            Required = true,
            MinLength = 0,
            MaxLength = 50)]
        public string ContactTitle { get; set; } // ContactTitle

        [Events(Event = EventTypes.OnChange, Callback = "ShowImg")]
        [FormFieldAttribute(Type = FormFieldTypes.Image)]
        [ImageTemplateOptionsAttribute(Label = "Foto",
            Description = "Inserisci la foto dell'articolo",
            Placeholder = "",
            Required = true,
            Folder = "/img_products")]
        public string Foto { get; set; }

        //[Events(Event = EventTypes.OnChange, Callback = "ShowImg")]
        //[FormFieldAttribute(Type = FormFieldTypes.Image)]
        //[ImageTemplateOptionsAttribute(Label = "Foto",
        //    Description = "",
        //    Placeholder = "Inserisci la foto del pezzo",
        //    Required = true,
        //    Folder = "/img_products")]
        //public string Image { get; set; }

        //public string Address { get; set; } // Address
        //public string City { get; set; } // City
        //public string Region { get; set; } // Region
        //public string PostalCode { get; set; } // PostalCode
        //public string Country { get; set; } // Country
        //public string Phone { get; set; } // Phone
        //public string Fax { get; set; } // Fax
    }
}